﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Volo.Abp.Domain.Entities;

namespace Demo.OrderService.Entities
{
    /// <summary>
    /// 订单信息表
    /// </summary>
    [Table("shop_order")]
    [Comment("订单信息表")]
    public class ShopOrder : Entity<Guid>
    {
        /// <summary>
        /// 订单号
        /// </summary>

        [Display(Name = "序号")]
        [Required(AllowEmptyStrings = false)]
        [Column(TypeName = "varchar(200)")]
        public string OrderNum { get; set; }
        /// <summary>
        /// 商品数量
        /// </summary>
        public int OrderQuantity { get; set; }
        /// <summary>
        /// 订单金额
        /// </summary>
        [Column(TypeName = "decimal(8, 2)")]
        public decimal Price { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        [MaxLength(10)]
        public string PayType { get; set; }
        /// <summary>
        /// 支付金额
        /// </summary>
        [Column(TypeName = "decimal(8, 2)")]
        public decimal PayPrice { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? PayTime { get; set; }
        /// <summary>
        /// 支付订单号
        /// </summary>
        [MaxLength(50)]
        public string PayOrderNum { get; set; }
        /// <summary>
        /// 交易状态1 待支付 2待发货 3已发货,4待评价 5完成 6退换货
        /// </summary>
        [MaxLength(1)]
        public int PayStatus { get; set; }
        /// <summary>
        /// 收货国家
        /// </summary>
        [MaxLength(100)]
        public string ReceivingCountry { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        [MaxLength(500)]
        public string Receiving_Address { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [MaxLength(50)]
        public string Consignee { get; set; }
        /// <summary>
        /// 联系人手机
        /// </summary>
        [MaxLength(50)]
        public string ReceivingPhone { get; set; }
        /// <summary>
        /// 联系邮箱
        /// </summary>
        [MaxLength(50)]
        public string ReceivingEmail { get; set; }
        /// <summary>
        /// 配送方式
        /// </summary>
        [MaxLength(50)]
        public string DeliveryMethod { get; set; }
        /// <summary>
        /// 发货时间
        /// </summary>
        public DateTime? ShipmentTime { get; set; }
        /// <summary>
        /// 收货时间
        /// </summary>
        public DateTime? DeliveryTime { get; set; }
        /// <summary>
        /// 0正常、1删除
        /// </summary>
        public int IsDelete { get; set; }
        /// <summary>
        /// 下单用户
        /// </summary>
        public string CreateUser { get; set; }
        /// <summary>
        /// 创建者
        /// </summary>
        public string CreateUserId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 更新人
        /// </summary>
        public string UpdateUserId { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 订单备注
        /// </summary>
        public string Remark { get; set; } 

    }
}
